package com.ruoyi.check.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.check.mapper.ETalkMapper;
import com.ruoyi.check.domain.ETalk;
import com.ruoyi.check.service.IETalkService;

/**
 * 心理咨询Service业务层处理
 * 
 * @author hugh.sun
 * @date 2024-04-17
 */
@Service
public class ETalkServiceImpl implements IETalkService 
{
    @Autowired
    private ETalkMapper eTalkMapper;

    /**
     * 查询心理咨询
     * 
     * @param id 心理咨询主键
     * @return 心理咨询
     */
    @Override
    public ETalk selectETalkById(Long id)
    {
        return eTalkMapper.selectETalkById(id);
    }

    /**
     * 查询心理咨询列表
     * 
     * @param eTalk 心理咨询
     * @return 心理咨询
     */
    @Override
    public List<ETalk> selectETalkList(ETalk eTalk)
    {
        return eTalkMapper.selectETalkList(eTalk);
    }

    /**
     * 新增心理咨询
     * 
     * @param eTalk 心理咨询
     * @return 结果
     */
    @Override
    public int insertETalk(ETalk eTalk)
    {
        eTalk.setCreateTime(DateUtils.getNowDate());
        return eTalkMapper.insertETalk(eTalk);
    }

    /**
     * 修改心理咨询
     * 
     * @param eTalk 心理咨询
     * @return 结果
     */
    @Override
    public int updateETalk(ETalk eTalk)
    {
        return eTalkMapper.updateETalk(eTalk);
    }

    /**
     * 批量删除心理咨询
     * 
     * @param ids 需要删除的心理咨询主键
     * @return 结果
     */
    @Override
    public int deleteETalkByIds(Long[] ids)
    {
        return eTalkMapper.deleteETalkByIds(ids);
    }

    /**
     * 删除心理咨询信息
     * 
     * @param id 心理咨询主键
     * @return 结果
     */
    @Override
    public int deleteETalkById(Long id)
    {
        return eTalkMapper.deleteETalkById(id);
    }
}
